{{define "setting/role.html"}}
<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html>
  <head>
		{{template "public/head.html"}}
  </head>
  
  <body class="hold-transition skin-blue sidebar-mini">
    <div class="wrapper" id="pagecontent">

		{{template "public/main-header.html"}}
      <!-- Left side column. contains the logo and sidebar -->
				
		{{template "public/main-sidebar.html"}}
      <!-- Content Wrapper. Contains page content -->
      <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
          <h1>
            权限资源
            <small>在这里配置角色,添加权限</small>
          </h1>
          <ol class="breadcrumb">
            <li><a href="javascript:void(0)"><i class="fa fa-dashboard"></i> 系统设置</a></li>
            <li class="active">权限资源</li>
          </ol>
        </section>

        <!-- Main content -->
        <section class="content" >


            <div class="row">
                <div class="col-xs-12">
                    <div class="box">
                        <div class="box-header">
                            <div class="btn-group  pull-left" role="group" >
                                <button type="button"  @click="faddrole" class="btn btn-success">添加角色</button>
                                <button type="button"  @click="faddresource" class="btn btn-default">添加权限</button>
                                <button type="button"  @click="faddmodule" class="btn btn-default">添加模块</button>
                            </div>
                        </div>

                        <!-- /.box-header -->
                        <div class="box-body" >

                            <div class="row">
                                <div class="col-md-4">

                                    <div class="box box-primary">
                                        <div class="box-header with-border">
                                            <h3 class="box-title">角色名称</h3>

                                        </div>
                                        <div class="box-body no-padding">
                                            <ul class="nav nav-pills nav-stacked" >

                                                <li v-for="role in roles" @click="showauth(role.id)"><a href="javascript:void(0);" v-html="'['+role.id+']'+role.name" ></a></li>


                                            </ul>
                                        </div>
                                        <!-- /.box-body -->
                                    </div>

                                </div>
                                <!-- /.col -->
                                <div class="col-md-8">
                                    <div class="box box-primary">
                                        <div class="box-header with-border">
                                            <h3 class="box-title">权限资源管理</h3>

                                            <!-- /.box-tools -->
                                        </div>
                                        <!-- /.box-header -->
                                        <div class="box-body no-padding">
                                            <ul id="authtree" class="ztree"></ul>
                                        </div>

                                    </div>
                                    <!-- /. box -->
                                </div>
                                <!-- /.col -->
                            </div>
                        </div>
                    </div>
                    <!-- /.box-body -->
                </div>
                <!-- /.box -->

            </div>
            <!-- /.col -->

        {{template "setting/addmod.html"}}
        {{template "setting/addres.html"}}
        {{template "setting/addrole.html"}}


        </section><!-- /.content -->
      </div><!-- /.content-wrapper -->
		
     	{{template "public/footer.html"}}
    </div><!-- ./wrapper -->

    <!-- REQUIRED JS SCRIPTS -->
	{{template "public/foot.html"}}

  </body>
</html>
<script>
var asseturi="{{asset}}";
</script>
<script src="{{asset}}/js/setting/role.js?v={{version}}"></script>
{{end}}
